package com.scc.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.scc.entity.Answers;

public interface AnswersMapper {
	/**
	 * 根据问题id查询所有回答
	 * @param id
	 * @return
	 */
	@Select("select * from answers where qid=#{qid}")
	List<Answers> selByQid(long qid);
	
	@Insert("insert into answers values(default,#{ansCount},now(),#{qid})")
	int insAnswer(Answers ans);
}
